<template>
	<view class="main_content" :style="{backgroundImage:`url(${ossImg('others/2025Autumn/background/bg.png')})`}">
		<image :src="ossImg('others/2025Autumn/logo.png')" mode="widthFix" class="w-240rpx h-105rpx"></image>
		<image :src="ossImg('others/2025Autumn/loading.gif')" mode="widthFix" class="w-300px h-139px mt-180px" style="border-radius: 16px;"></image>
		<view class="lineLoading" :style="{backgroundImage:`url(${ossImg('others/2025Autumn/linebackground/loadingBg.png')})`}"></view>
		<view class="cloudBg"><image :src="ossImg('others/2025Autumn/cloud.png')" mode="widthFix"></image></view>
	</view>
</template>
<script setup>
	import { onLoad } from '@dcloudio/uni-app';
	import { ossImg } from "@/utils/utils";
	onLoad(() => {
		setTimeout(() => {
			uni.navigateTo({
				url: "/campaign/pages/2025Autumn/dreamSpark"
			})
		}, 1e3)
		// uni.request({
		//   url: `${process.env.BASE_API}api-fainro/temporary/getConfig`,
		//   method: "get",
		//   header: {
		//     Authorization: uni.getStorageSync("TOKEN")
		//       ? `Bearer ${uni.getStorageSync("TOKEN")}`
		//       : "",
		//   },
		// }).then(res => {
		//   if (res.data?.code === 200) {
		//     res.data.data.biscuit = res.data.data.biscuit.map(item => ({
		//       ...item,
		//       image: item.image.includes("biscuit") ? item.image : item.image.replace('/oreo', '/oreo/biscuit'),
		//       imageGlow: item.imageGlow.includes("biscuit") ? item.imageGlow : item.imageGlow.replace('/oreo', '/oreo/biscuit'),
		//     }))
		//     uni.setStorageSync("autumnConfig", res.data.data)
		//     setTimeout(() => {
		//       uni.redirectTo({
		//         url: "/campaign/pages/2025Autumn/dreamSpark"
		//       })
		//     }, 1e5)
		//   }
		// });
	})
</script>

<style lang="less" scoped>
	@import "@/static/css/theme.less";
	@import "@/static/css/autumn/main.less";

	.main_content {
		width: 100%;
		height: 100vh;
		display: flex;
		box-sizing: border-box;
		padding-top: 30px;
		background-size: cover;
		flex-direction: column;
		align-items: center;
		position: fixed;
		top:0;left:0;right:0;bottom:0;
	}
</style>
